<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button id="saveBtn">save</button>
    <script>
        const saveBtn = document.getElementById('saveBtn');



        const o1 = {
            say() {
                console.log('1');
            }
        }

        const o2 = {
            say() {
                console.log('2');
            }
        }

        const o3 = {
            say() {
                console.log('3');
            }
        }


        saveBtn.onclick = function () {
            o1.say();
            o2.say();
            o3.say();
        }

    </script>

</body>

</html>